<script lang="ts">
    import mixin from "@/uni_modules/u-tools/mixin/mixin";
    import mpMixin from "@/uni_modules/u-tools/mixin/mpMixin";

    export default {
        name: "u-capsule-place",
        // 混合
        mixins: [mixin, mpMixin],
        // 数据
        data()
        {
            return {};
        },
        // 暴露方法
        expose: ["getCapsuleHeight"],
        // 计算属性
        computed: {
            calculateCapsuleHeight(): number
            {
                return this.getCapsuleHeight();
            }
        },
        // 方法
        methods: {
            // 获取胶囊高度
            getCapsuleHeight(): number
            {
                return this.$u.getCapsuleGeometry().height;
            }
        }
    };
</script>

<template>
    <!-- 胶囊占位`组件 -->
    <view
        :class="customClass"
        :style="customStyle"
        class="u-capsule-place-wrap"
    >
        <!-- 内盒 -->
        <view
            :style="{'height': $u.unit(calculateCapsuleHeight)}"
            class="u-capsule-place"
        />
        <!-- //内盒 -->
    </view>
    <!-- //胶囊占位组件 -->
</template>

<style lang="scss" scoped>

</style>